﻿(function () {

    function ViewModel() {
        var self = this;
        this.Cars = ko.observableArray([
            "Dacia",
            "BMW",
            "Chevrolet",
            "Mustang",
            "Dodge"
        ]);
        this.DealerName = "Awesome Car Dealer";
        this.NewCarName = ko.observable();
        this.onAddNewCarClick = function () {
            self.Cars.push(self.NewCarName());
        };
    };



    setTimeout(function () {

        ko.applyBindings(new ViewModel());

    }, 1);
})
.call(window);